package com.itheima.boottlias.reflect;

import java.time.LocalDate;

/**
 * 学生类
 */
public class Stu {
    private Integer id;
    private String name;
    private String no;
    private Integer gender;
    private String phone;
    private LocalDate birth;

    public Stu() {
        System.out.println("Student NoArgsConstructor ..");
    }

    protected Stu(Integer id) {
        this.id = id;
        System.out.println("Student OneArgsConstructor ..");
    }

    private Stu(Integer id, String name) {
        this.id = id;
        this.name = name;
        System.out.println("Student TwoArgsConstructor ..");
    }

    public void study() {
        System.out.println(name + "在学习");
    }

    protected void eat(String food){
        System.out.println(name + "在吃" + food);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public LocalDate getBirth() {
        return birth;
    }

    public void setBirth(LocalDate birth) {
        this.birth = birth;
    }
}